package chp06.homework;

public class Home4 {

    public static void main(String[] args) {
        //暴力破解
        for (int men = 0; men <= 30; men++) {
            for(int women = 0; women <= 30;women++) {
                int kids = 30 - men - women;
                if(kids >= 0 && men*3 + women*2 + kids==50) {
                    System.out.println("男:" + men + "\t女:" + women + "\t小孩:" + kids);
                }
            }
        }
    }
}
